01. The Command Line

Why Does Command Line Matter?

The command line is an alternative to the GUI based interface we are so used to. Although GUI interfaces are quite easy to use, they are not as flexible as the command line. Imagine copying a thousand files with a GUI. It would take a few clicks to select the files, some scrolling and some to and fro between the source and target directories. Doing the same thing from command line involves a fair bit of typing. So the command line approach may not seem a clear winner. Now consider renaming files in bulk or separating them based on their timestamps. It is tough to perform tasks like these from the GUI because GUIs are not programmable. With the command line you can combine multiple commands to, for example, find the timestamp, and copy the files based on the timestamps.

A good command line interface, like the Linux shell allows you to write scripts to automate tasks like these. In fact, the Linux shell comes with a long list of commands that can be composed to automate any task imaginable. This ability to build larger programs from smaller ones is what gives the command line its power and flexibility.

In this lesson you learn about some of the most useful commands and how to combine them into larger commands.